<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 ssl_crt.php
 *                            -------------------
 *   Begin                : Wednesday, May 18, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
include $root_path.'common.php';
$page_title = 'SSL Certificates';
include $root_path.'page_header.php';

$template->set_filenames(array(
	'body' => $root_path.$template_path.'server/ssl_crt.tpl')
);

$current_crts = <<<EOFpacman
<cpanel SSL="listcrts()">
EOFpacman;

if (trim($current_crts) == 'No SSL CRTs Found')
{
	$template->assign_block_vars('switch_no_crt', array());
}
else
{
	$current_crts = explode('<br />', nl2br($current_crts));
	
	foreach ($current_crts as $crt)
	{
		if (trim($key) != '') {
			$template->assign_block_vars('current_crt_row', array(
				'KEY_NAME' => $key,
				'U_VIEW' => 'ssl_crts_view.php?host='.$crt,
				'U_DELETE' => 'ssl_crts_delete.php?host='.$crt,
			));
		};
	};
};

$s_ssl_keys = <<<EOFpacman
<cpanel SSL="listkeysopt()">
EOFpacman;

$template->assign_vars(array(
	'S_UPLOAD_CRT' => 'ssl_crts_add_done.php',
	'S_GENERATE_CRT' => 'ssl_crts_generate_done.php',
	'S_SSL_KEYS' => $s_ssl_keys,
));

//
// Woohoo! All done!
//
$template->pparse('body');


include $root_path.'page_tail.php';




?>